package com.liudaolunhui.interfaces;

import java.lang.reflect.Proxy;

import org.junit.Test;

public class TestProxy {
	@Test
	public void textTime(){
		Car car = new Car();
		Class<?> cls = car.getClass();
		TimeProxy tP = new TimeProxy(car); 
		Moveable moveable = (Moveable) Proxy.newProxyInstance(cls.getClassLoader(), cls.getInterfaces(),tP);
		moveable.move();
	}
}
